Option Explicit

'
' aiNet function declarations
'
Declare Function aiCreateModel Lib "ainet16.dll" (ByVal nModelVectors As Integer, ByVal nVariables As Integer, ByVal nInpVariables As Integer) As Long
Declare Function aiCreateModelFromCSVFile Lib "ainet16.dll" (ByVal fileName As String) As Long
Declare Function aiDeleteModel Lib "ainet16.dll" (ByVal model As Long) As Integer
Declare Function aiNormalize Lib "ainet16.dll" (ByVal model As Long, ByVal method As Integer) As Integer
Declare Function aiDenormalize Lib "ainet16.dll" (ByVal model As Long) As Integer
Declare Function aiRegistration Lib "ainet16.dll" (ByVal user As String, ByVal code As String) As Integer
Declare Function aiPrediction Lib "ainet16.dll" (ByVal model As Long, toPredict As Single, ByVal penalty As Single, ByVal method As Integer) As Integer
Declare Function aiGetVariableVB Lib "ainet16.dll" (ByVal model As Long, ByVal mv As Integer, ByVal v As Integer, value As Single) As Integer
Declare Function aiSetVariable Lib "ainet16.dll" (ByVal model As Long, ByVal mv As Integer, ByVal v As Integer, ByVal value As Single) As Integer
Declare Function aiGetCSVFileModelSize Lib "ainet16.dll" (ByVal fileName As String) As Integer
Declare Function aiGetVersion Lib "ainet16.dll" () As Integer
Declare Function aiGetNumberOfVariables Lib "ainet16.dll" (ByVal model As Long) As Integer
Declare Function aiGetNumberOfModelVectors Lib "ainet16.dll" (ByVal model As Long) As Integer
Declare Function aiGetNumberOfInputVariables Lib "ainet16.dll" (ByVal model As Long) As Integer
Declare Function aiSetDiscreteFlag Lib "ainet16.dll" (ByVal model As Long, ByVal v As Integer, ByVal f As Integer) As Integer
Declare Function aiGetDiscreteFlag Lib "ainet16.dll" (ByVal model As Long, ByVal i As Integer) As Integer

'
' aiNet error constants
'
Global Const AIERR_NO_ERROR = 0
Global Const AIERR_PENALTY_ZERO = -1
Global Const AIERR_NO_IO_VARIABLES = -2
Global Const AIERR_PENALTY_TOO_SMALL = -3
Global Const AIERR_EMPTY_ROW = -4
Global Const AIERR_EMPTY_COLUMN = -5
Global Const AIERR_EQUAL_COLUMN = -6
Global Const AIERR_CSV_OPEN = -7
Global Const AIERR_CSV_READ = -8
Global Const AIERR_MEMORY_ALLOCATION = -9
Global Const AIERR_INVALID_POINTER = -10
Global Const AIERR_INVALID_INDEX = -11

'
' Penalty coefficient constants
'
Global Const PENALTY_STATIC = 0
Global Const PENALTY_DYNAMIC = 1
Global Const PENALTY_NEAREST = 2

'
' Normalization constants
'
Global Const NORMALIZE_REGULAR = 0
Global Const NORMALIZE_STATISTICAL = 1

